package DecChallenges;

//https://leetcode.com/problems/count-of-matches-in-tournament/description/?envType=daily-question&envId=2023-12-05
public class Day5_P1688 {
    public int numberOfMatches(int n) {
        int ans = 0;
        while(n > 1) {
            ans += n / 2;
            n = n / 2 + n % 2;
        }
        return ans;
    }
}

